<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <title></title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <style>
  html,body{overflow:hidden;}
  *{margin:0;padding:0;}
  </style>
 </head>
 <body> 
<object id="Player" width=300 height=300 classid="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6"  >
	<param name="URL" value="C:\Users\user\Desktop\全屏播放\a.wmv">
	<param name="autoStart" value="1">
	<param name="balance" value="0">
	<param name="baseURL" value>
	<param name="captioningID" value>
	<param name="currentPosition" value="0">
	<param name="currentMarker" value="0">
	<param name="defaultFrame" value>     
	<param name="enabled" value="1">
	<param name="enableErrorDialogs" value="0">
	<param name="enableContextMenu" value="1">               
	<param name="fullScreen" value="-1">      
	<param name="invokeURLs" value="1">
	<param name="mute" value="0">
	<param name="rate" value="1">
	<param name="stretchToFit" value="1">
	<param name="uiMode" value="full">
	<param name="volume" value="100">
	<param name="windowlessVideo" value="0">
	<param name="playCount" value="9999">   
</object>
<br><br><br><br>
<input type="Text" name="songURL" value ="C:\Users\user\Desktop\全屏播放\b.wmv"><br>
<INPUT TYPE = "BUTTON" ID = "add" Name="add"  VALUE = "添加本地视频到播放列表" onClick = "addUrlToList();"><br>
<input type="checkbox" name="song" value ="C:\Users\user\Desktop\全屏播放\b.wmv">b.wmv<br>
<INPUT TYPE = "BUTTON" ID = "play" Name="play"  VALUE = "播放选中的歌曲" onClick = "addSeletedSongToPlayList();"> 
<INPUT TYPE = "BUTTON" ID = "clear" Name="clear" VALUE = "清空播放列表" onClick = "clearlist();"> <br>
<script language="JavaScript">
// 增加一首歌到播放器列表，这样，播放器放完一首歌之后，会继续放下一首
function addmedia(url){
	// Player.controls.stop();                 //停止播放器
	// alert( Player.versionInfo); //播放器的版本信息
	// 取得当前的播放列表
	var playlist=Player.currentPlaylist;//新建一个指定URL的Media。
	var currMedia = Player.newMedia(url);
	//把新建的Media item添加到播放器列表
	playlist.appendItem(currMedia);
}
//清空播放列表
function clearlist(){                
	//Player.currentPlaylist.count返回列表中的歌曲数量
	while(Player.currentPlaylist.count>0) {
		var            item =Player.currentPlaylist.item(Player.currentPlaylist.count-1);
		Player.currentPlaylist.removeItem(item);                 //            从播放列表中删除项
	}
}
//播放选中的歌曲
function addSeletedSongToPlayList(){        
	clearlist();
	var selectItem =            document.getElementsByName("song");
	// alert(selectItem.length);            
	for(var i=0;i<selectItem.length;i++){
	if(selectItem[i].checked==true){        
		//alert(selectItem[i].value);
		addmedia(selectItem[i].value);   
		}
	} 
	// alert(Player.currentPlaylist.count);
	Player.controls.play();            //让播放器开始播放
}
//添加文本输入框中的url到播放列表
function addUrlToList(){
	addmedia( document.getElementById("songURL").value );
}
</script>
 </body>
 </html>
 
 